﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using HelloMVC.Model;
using HelloMVC.Interface.Repository;


namespace HelloMVC.Repository
{
    public class ProjectRepository : IProjectRepository
    {
        /// <summary>
        /// Get All Projects object
        /// </summary>
        /// <returns></returns>
        public IList<Project> AllProjects()
        {
            return Mapper.Instance().QueryForList<Project>("AllProjects", null);
        }


        /// <summary>
        /// 
        /// </summary>
        /// <param name="projectId"></param>
        /// <returns></returns>
        public Project QueryProject(Int32 projectId)
        {
            return Mapper.Instance().QueryForObject<Project>("QueryProject", projectId);
        }
    }
}
